﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TainguyenComponent.DAL;

namespace TainguyenComponent.BLL
{
    public class Tainguyen:ITainguyen
    {
        #region properties
        public TainguyenDAL tainguyenDAL;
        private int _tai_nguyen_id;

        public int Tai_nguyen_id
        {
            get { return _tai_nguyen_id; }
            set { _tai_nguyen_id = value; }
        }
        private int _ung_dung_id;

        public int Ung_dung_id
        {
            get { return _ung_dung_id; }
            set { _ung_dung_id = value; }
        }
        private string _ma;

        public string Ma
        {
            get { return _ma; }
            set { _ma = value; }
        }

        private string _ten;

        public string Ten
        {
            get { return _ten; }
            set { _ten = value; }
        }
        private string _path;

        public string Path
        {
            get { return _path; }
            set { _path = value; }
        }
        private string _tenfile;

        public string Tenfile
        {
            get { return _tenfile; }
            set { _tenfile = value; }
        }
        private string _url;

        public string Url
        {
            get { return _url; }
            set { _url = value; }
        }
        private int _type;

        public int Type
        {
            get { return _type; }
            set { _type = value; }
        }
        
        #endregion

        #region Method
        public Tainguyen()
        {
            tainguyenDAL = new TainguyenDAL();
        }
        public void Get()
        {
            tainguyenDAL.Get(this);
        }
        public int Add()
        {
            return tainguyenDAL.Add(this);
        }
        public void Delete()
        {
            tainguyenDAL.Delete(this);
        }
        public void Update()
        {
            tainguyenDAL.Update(this);
        }
        public List<Tainguyen> GetAll(int currentPage, int pageSize, out int total, string ten, string column_sort, string type_sort)
        {
            return tainguyenDAL.GetAll(currentPage, pageSize, out total, ten, column_sort, type_sort);
        }
        #endregion
    }
}
